﻿﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using NewLife.CommonEntity;
using System.Xml.Serialization;
using NewsPub;

public partial class Pages_Classis : MyEntityList<Classis>
{
    ///// <summary>实体类型</summary>
    //public override Type EntityType { get { return CommonManageProvider.Provider.MenuType; } set { base.EntityType = value; } }

    protected void Page_Load(object sender, EventArgs e)
    {
        //if (!IsPostBack)
        //{
        //    // 添加按钮需要添加权限
        //    lbAdd.Visible = Acquire(PermissionFlags.Insert);
        //    // 最后一列是删除列，需要删除权限
        //    gv.Columns[gv.Columns.Count - 1].Visible = Acquire(PermissionFlags.Delete);
        //}
    }
    protected void GridView1_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Up")
        {
            Classis entity = Classis.FindByID(Convert.ToInt32(e.CommandArgument));
            if (entity != null)
            {
                entity.Up();
                gv.DataBind();
            }
        }
        else if (e.CommandName == "Down")
        {
            Classis entity = Classis.FindByID(Convert.ToInt32(e.CommandArgument));
            if (entity != null)
            {
                entity.Down();
                gv.DataBind();
            }
        }
    }

}